﻿using System;
class QuadraticRoots
{
    static void Main()
    {
        int coefficienta;
        int coefficientb;
        int coefficientc;
        Console.Write("Please input first number: ");
        while (true)
        {
            try
            {
                coefficienta = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message + "\nPlease re-enter first number:");
            }
        }
        Console.Write("Please input second number: ");
        while (true)
        {
            try
            {
                coefficientb = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message + "\nPlease re-enter second number:");
            }
        }
        Console.Write("Please input third number: ");
        while (true)
        {
            try
            {
                coefficientc = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message + "\nPlease re-enter third number:");
            }
        }

        double rootone = ((coefficientb + Math.Sqrt(coefficientb * coefficientb - 4 * coefficienta * coefficientc)) / (2 * coefficienta));
        double roottwo = (((coefficientb * -1) + Math.Sqrt(coefficientb * coefficientb - 4 * coefficienta * coefficientc)) / (2 * coefficienta));
        Console.WriteLine("{0:F4}", rootone);
        Console.WriteLine("{0:F4}", roottwo);
        Console.ReadLine();
    }
}

